Skip to content

feat: remove feature flag from Type Builder enablement check#192

Open
angeloashmore wants to merge 1 commit into
mainfrom
aa/remove-type-builder-feature-flag
Open

feat: remove feature flag from Type Builder enablement check#192
angeloashmore wants to merge 1 commit into
mainfrom
aa/remove-type-builder-feature-flag

Conversation

@angeloashmore

@angeloashmore angeloashmore commented Jun 16, 2026

Copy link
Copy Markdown
Member

Resolves: https://app.notion.com/p/prismic/Good-bye-Slice-Machine-3343bee0866980a2b112c9e05c606145?source=copy_link

Description

Allow migration from Slice Machine to Type Builder/CLI via prismic init. This was allowed before, but only to repositories that had the feature flag enabled. Now, all repos can perform the migration.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Run prismic init in a Slice Machine project whose repository has the Slice Machine quota enabled but is not in the dev-tools-types-builder-cloud flag rollout. It should now proceed with the migration instead of failing with the "requires the Type Builder" error.

🤖 Generated with Claude Code


Note

Low Risk
Narrows the gate to repository quota only and removes two API calls; behavior for non-quota repos is unchanged and there is no auth or data-model change.

Overview
Type Builder enablement no longer depends on the Amplitude dev-tools-types-builder-cloud flag or a user profile lookup. checkIsTypeBuilderEnabled now only honors PRISMIC_TYPE_BUILDER_ENABLED when set, otherwise it fetches the repository and returns whether quotas.sliceMachineEnabled is true.

For prismic init with --repo (or a legacy Slice Machine config), repos with the Slice Machine quota can migrate to Type Builder/CLI even when they were outside the old flag rollout; repos without that quota still hit TypeBuilderRequiredError.

Reviewed by Cursor Bugbot for commit be2582a. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

The Type Builder enablement check no longer depends on the dev-tools-types-builder-cloud Amplitude flag. It now relies solely on the repository's Slice Machine quota, keeping the existing PRISMIC_TYPE_BUILDER_ENABLED env override. Removes the now-unused getVariantData/getProfile calls and their imports.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore marked this pull request as ready for review June 16, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants